// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;
import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CatalogProductBundleOption generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_bundle_option", catalog = "magento")
public class CatalogProductBundleOption implements java.io.Serializable {

	private Integer optionId;
	private CatalogProductEntity catalogProductEntity;
	private short required;
	private int position;
	private String type;
	private Set catalogProductBundleOptionValues = new HashSet(0);
	private Set catalogProductBundleSelections = new HashSet(0);

	public CatalogProductBundleOption() {
	}

	public CatalogProductBundleOption(
			CatalogProductEntity catalogProductEntity, short required,
			int position) {
		this.catalogProductEntity = catalogProductEntity;
		this.required = required;
		this.position = position;
	}

	public CatalogProductBundleOption(
			CatalogProductEntity catalogProductEntity, short required,
			int position, String type, Set catalogProductBundleOptionValues,
			Set catalogProductBundleSelections) {
		this.catalogProductEntity = catalogProductEntity;
		this.required = required;
		this.position = position;
		this.type = type;
		this.catalogProductBundleOptionValues = catalogProductBundleOptionValues;
		this.catalogProductBundleSelections = catalogProductBundleSelections;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "option_id", unique = true, nullable = false)
	public Integer getOptionId() {
		return this.optionId;
	}

	public void setOptionId(Integer optionId) {
		this.optionId = optionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "parent_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "required", nullable = false)
	public short getRequired() {
		return this.required;
	}

	public void setRequired(short required) {
		this.required = required;
	}

	@Column(name = "position", nullable = false)
	public int getPosition() {
		return this.position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	@Column(name = "type")
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductBundleOption")
	public Set getCatalogProductBundleOptionValues() {
		return this.catalogProductBundleOptionValues;
	}

	public void setCatalogProductBundleOptionValues(
			Set catalogProductBundleOptionValues) {
		this.catalogProductBundleOptionValues = catalogProductBundleOptionValues;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductBundleOption")
	public Set getCatalogProductBundleSelections() {
		return this.catalogProductBundleSelections;
	}

	public void setCatalogProductBundleSelections(
			Set catalogProductBundleSelections) {
		this.catalogProductBundleSelections = catalogProductBundleSelections;
	}

}
